{template "contest","header"}

		<!--幻灯片end-->
	
	<!--新闻主体-->
	
		
	<div class="con" id="first">
     <section class="bigtit">————&nbsp;{$cateInfo['catname']}&nbsp;————</section>
     <section class="newscon">
        {loop $cateList $r}
        <div id="flSw">
          <b>|&nbsp;&nbsp;</b>
          <span id="fl1">{$r['catname']}</span>
          <b>&nbsp;&nbsp;|</b>
        </div>
        <div class="imgslist">
           <div class="fl1">
            <ul id="catid_ajax_{$r['catid']}"> 
            {loop $r['list']['returnList'] $v}
             <li><a {if $v['type'] ==1 }href="/index.php?m=contest&c=index&a=show&id={$v[id]}&catid={$r['catid']}"{elseif $v['type'] ==3}href="/index.php?m=contest&c=index&a=imageshow&id={$v[id]}&catid={$r['catid']}"{elseif $v['type'] ==2}href="/index.php?m=contest&c=index&a=videoshow&id={$v[id]}&catid={$r['catid']}"{/if}>
               <img src="{$v['image']}">
              <div class="imgcon">
               {$v['title']}
              </div></a>
              </li>
            {/loop}
            </ul>
            <div class="clear"></div>
            <div class="imgmore"><a href="javascript:;" onclick="ajaxList(this,{$r['catid']})" data="2" class="imgmorelink">加载更多&nbsp;&gt;&gt;</a></div>
           </div>
        </div>
        {/loop}
     </section>
    <script>	
    </script>
    
    </div>

	<!--新闻主体end-->
	
		{template "contest","footer"}
    
		<script>
			var swiper = new Swiper('.swiper-container.SuEvent-Cbox', {
				pagination: '.swiper-pagination.zooeySU-Pag',
				nextButton: '.swiper-button-next.Su-next',
				prevButton: '.swiper-button-prev.Su-prev',
				slidesPerView: 1,
				paginationClickable: true,
				spaceBetween: 30,
				loop: true
			});
		</script>

		<script type="text/javascript">
			var swiper1 = new Swiper('.swiper-container.banner-lc', {
				pagination: '.swiper-pagination.banner-lc-page',
				paginationClickable: true,
				autoplay: 3000,
				speed: 2000
			});
			var swiper2 = new Swiper('.swiper-container.model-swiper', {
				pagination: '.swiper-pagination',
				effect: 'coverflow',
				grabCursor: true,
				centeredSlides: true,
				slidesPerView: '2.5',
				coverflow: {
					rotate: 0,
					stretch: 100,
					depth: 200,
					modifier: 1,
					slideShadows: true,
					speed: 1000

				},
				loop: true,
				loopedSlides: 5
				/*         prevButton:'.swiper-button-prev-2',
						 nextButton:'.swiper-button-next-2',*/
			});
			var swiper3 = new Swiper('.swiper-container.dualswiper', {
				pagination: '.swiper-pagination.banner-lc-page',
				autoplay: 1000,
				speed: 2000,
				slidesPerView: '2',
				prevButton: '.swiper-button-prev',
				nextButton: '.swiper-button-next',
				loop: true
			});
			Caroursel.init($('.caroursel'));
		</script>

		<script type="text/javascript">
			jQuery(document).ready(function($) {
				$(".poster-btn").css({
					"width": 44,
					"backgroundColor": "none"
				})
			});
      function ajaxList(obj, catid) {
        var page = $(obj).attr('data');
        var num = $('#catid_ajax_'+catid+' li').size();
        if(num%6 != 0) {
        	$(obj).parent().replaceWith('<a href="javascript:;" class="imgmorelink">没有了</a>');
        }
        $.ajax({
          type:"post",
          url:"?m=contest&c=index&a=ajaxNewsList",
          data:{page:page,catid:catid,num:6},
          dataType: "json",
          success:function(data){
          	if (data['data'] != null && data['data'] != undefined && data['data'] != '') {
	            if(data.data.returnList.length != 6) {
	            	$(obj).parent().replaceWith('<a href="javascript:;" class="imgmorelink">没有了</a>');
	            } else {
	            	$(obj).attr('data',parseInt(page)+parseInt(1));
	            }
	        }
            var _html = '';
        	var jsonobj = data['data']['returnList'];
        	for(key in jsonobj){
			      _html +='<li><a';
			      if(jsonobj[key]['type'] == 1) {
			      	_html += ' href="/index.php?m=contest&c=index&a=show&id='+jsonobj[key]['id']+'&catid='+catid+'"'
			      } else if (jsonobj[key]['type'] == 3){
			      	_html += ' href="/index.php?m=contest&c=index&a=imageshow&id='+jsonobj[key]['id']+'&catid='+catid+'"'
			      } else if (jsonobj[key]['type'] == 2){
			      	_html += ' href="/index.php?m=contest&c=index&a=videoshow&id='+jsonobj[key]['id']+'&catid='+catid+'"'
			      }
			      _html +='><img src="';
			      _html +=jsonobj[key]['image'];
			      _html +='"><div class="imgcon">';
			      _html +=jsonobj[key]['title'];
			      _html +='</div></a></li>';
			}
            $('#catid_ajax_'+catid).append(_html);
          }
        })
      }
		</script>

		<script type="text/javascript">
			$(function() {
				$('#dualswiper').owlCarousel({
					items: 1,
					navigation: true,
					navigationText: ["上一个", "下一个"],
					autoPlay: true,
					stopOnHover: true,
					/*afterInit: function(){
						var $t = $('.owl-pagination span');
						$t.each(function(i){
							$(this).before('<img src="img/t' + (i+1) + '.jpg">');
						})
					}*/
				});
			});
		</script>

</body>
</html>